package one.stand.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import one.stand.aop.ApiController;
import one.stand.model.ResultModel;
import one.stand.request.BusinessCardVideoRequest;
import one.stand.response.BusinessCardResponse;
import one.stand.response.BusinessCardVideoResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: QIK
 * @CreateDate: 2019/6/21 17:32
 */
@RestController
@RequestMapping("crmApi/businessCardVideo")
@Api(description  = "名片视频")
public class BusinessCardVideoController extends BaseController {


    /**
     * 添加名片视频
     * @param request
     * @return
     */
    @PostMapping("addVideo")
    @ApiOperation(value = "添加名片视频")
    @ApiController(isLogin = true,card = true,paramClass = BusinessCardVideoRequest.class)
    public ResultModel<Boolean> addVideo(@RequestAttribute BusinessCardVideoRequest request){
        return userFegin.addVideo(request);
    }

    /**
     * 修改名片视频
     * @param request
     * @return
     */
    @PostMapping("uodVideo")
    @ApiOperation(value = "修改名片视频")
    @ApiController(isLogin = true,card = true,paramClass = BusinessCardVideoRequest.class)
    public ResultModel<Boolean> uodVideo(@RequestAttribute BusinessCardVideoRequest request){
        return userFegin.uodVideo(request);
    }

    /**
     * 移动名片视频
     * @param request
     * @return
     */
    @PostMapping("moveVideo")
    @ApiOperation(value = "移动名片视频")
    @ApiController(isLogin = true,card = true,paramClass = BusinessCardVideoRequest.class)
    public ResultModel<Boolean> moveVideo(@RequestAttribute BusinessCardVideoRequest request){
        return userFegin.moveVideo(request);
    }

    /**
     * 删除视频
     * @param request
     * @return
     */
    @PostMapping("delVideo")
    @ApiOperation(value = "删除视频")
    @ApiController(isLogin = true,card = true,paramClass = BusinessCardVideoRequest.class)
    public ResultModel<Boolean> delVideo(@RequestAttribute BusinessCardVideoRequest request){
        return userFegin.delVideo(request);
    }

    /**
     * 获取个人视频
     * @param request
     * @return
     */
    @PostMapping("moveList")
    @ApiOperation(value = "获取个人视频")
    @ApiController(isLogin = true,card = true,paramClass = BusinessCardVideoRequest.class)
    public ResultModel<List<BusinessCardVideoResponse>> moveList(@RequestAttribute BusinessCardVideoRequest request){
        return userFegin.moveList(request);
    }
}
